<template>
	<view class="notice con_auto">
		<view class="notice_title">{{detailInfo.title}}</view>
		<view class="notice_desc">
			{{detailInfo.create_time}}
		</view>
		<view class="notice_content">
			<u-parse :content="detailInfo.content"></u-parse>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			detailId: 0,
			detailInfo: []
		};
	},
	onLoad({ id }) {
		if (id) {
			this.detailId = id;
		}
		this.getInfo();
	},
	methods: {
		getInfo() {
			let _this = this;
			_this
				.$http('notice/getDetailInfo', {
					id: this.detailId
				})
				.then((res) => {
					if (res.code) {
						this.detailInfo = res.data;
						uni.setNavigationBarTitle({
							title:res.data.title
						})
					}
				});
		}
	}
};
</script>

<style lang="scss" scoped>
.notice_title {
	color: #333;
	font-weight: bold;
	padding: 24rpx 0;
}
.notice_desc {
	color: $common-grey-color;
	font-size: 28rpx;
}
</style>
